﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Students
{
    class Program
    {
        static void Main(string[] args)
        {
            List<Student> students = new List<Student>()
            {
                new Student(){ ID=1, name="张丽", wen=false,chinese=127, math=145, english=122, zong=289},
                new Student(){ ID=2, name="刘亮", wen=true,chinese=103, math=145, english=122, zong=250},
                new Student(){ ID=3, name="薛贵", wen=true,chinese=136, math=102, english=89, zong=189},
                new Student(){ ID=4, name="关迪", wen=true,chinese=126, math=98, english=140, zong=238},
            };

            var egm = students.Where(x => x.wen == true)
                .Average(x => x.chinese + x.math + x.english + x.zong);
            Console.WriteLine(egm);
        }
    }
}
